<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>dogg</title>
</head>

<body style="text-align: center;">
    <img src="./Dog/qpgg.jpg" alt="" style="width: 920px;height: 700px;">
</body>
<script type="text/javascript">
    const dogImg = ['bgg.jpg', 'qpgg.jpg', 'xdgg.jpg'];
    var cur = document.getElementsByTagName('img')[0];
    console.log(cur);
    var sign = 0;
    function loop() {
        if (sign < 2) {
            sign++;
        } else {
            sign = 0;
        }
        cur.src = './Dog/' + dogImg[sign];
        return setTimeout(loop, 3000);

    }
    setTimeout(loop, 1000);
</script>

</html>